function showNews(id, title, lead, content, category, pictures, gallery)
{
	document.getElementById("selectedNews").style.display = "block";
	document.modifyNewsForm.id.value = id;
	document.modifyNewsForm.title.value = title;
	document.modifyNewsForm.lead.value = lead;
	document.modifyNewsForm.content.value = content;

	currSelect = document.modifyNewsForm.category
	for (i = 0; i < currSelect.options.length; i++)
	{
		if (currSelect.options[i].value == category)
		{
			currSelect.options[i].selected = true;
		}
	}

	if (gallery != "")
	{
		for (i = 0; i < pictures.length; i++)
		{
			if (pictures[i] == 1)
			{
				document.getElementById("pic" + (i + 1)).src = "/gallery/" + gallery + "/thumb" + i + ".jpg";
			}
			else
			{
				document.getElementById("pic" + (i + 1)).src = "/images/nopic.png";
			}
		}
	}
	document.modifyNewsForm.picid.value = gallery;
}
